<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="{{asset('layui-v2.6.8/layui/css/layui.css')}}">
    <script src="{{asset('js/jquery.min.js')}}"></script>
    <script src="{{asset('layui-v2.6.8/layui/layui.js')}}"></script>
    <title>好友列表</title>
</head>
<body>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
    <legend>好友列表</legend>
</fieldset>
<div class="layui-form">
    <table class="layui-table">
        <colgroup>
            <col width="150">
            <col width="150">
            <col width="200">
            <col>
        </colgroup>
        <thead>
        <tr>
            <th>好友</th>
            <th>角色</th>
            <th>状态</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        @foreach($data as $k=>$v)
            <tr>
                <td>名字:{{$v['username']}}</td>
                <td>{{$v['role_name']}}</td>
                <td>{{$v['status']}}</td>
                <td>
                    <div class="layui-btn-group">
                        <a href="{{route('im.chat',$v['id'])}}" class="layui-btn">聊天</a>
                    </div>
                </td>
            </tr>
        @endforeach
        </tbody>
    </table>
</div>

<hr>

</body>
<script>
    layui.use(['form', 'layedit', 'laydate'], function(){
        var form = layui.form
            ,layer = layui.layer
            ,layedit = layui.layedit
            ,laydate = layui.laydate

        form.render(); //更新全部
    });


</script>
</html>
